<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="language" content="en" />
<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/project.css" />
<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/emptyform.css" />
<title><?php echo $this->pageTitle; ?></title>
</head>

<?php
$project = $this->project;
?>

<body id="project">
<div id="page">

<?php

$meetings = array ();

foreach ($project->meetings as $meeting) {
	$d = Yii::app()->dateFormatter->format('dd MMMM yyyy', $meeting->meeting_date);
	$url = $meeting->completed ? 'meeting/show' : 'meeting/edit';

	$meetings[] = array (
		'label' => $d,
		'url' => $this->createUrl($url, array (
			'id' => $meeting->id,
			'project_id' => $meeting->project->id
		))
	);
}

$this->widget('application.extensions.mbmenu.MbMenu', array (
	'items' => array (
		array (
			'label' => Yii::t('project', 'Project'),
			'items' => array (
				array (
					'label' => Yii::t('project', 'Home'),
					'url' => Yii::app()->createUrl('/adviser/project/show', array (
						'id' => $project->id
					))
				),
				array (
					'label' => Yii::t('project', 'New meeting'),
					'url' => Yii::app()->createUrl('/adviser/meeting/create', array (
						'project_id' => $project->id
					))
				),
				array (
					'label' => Yii::t('project', 'Printings'),
					'url' => Yii::app()->createUrl('/adviser/printing/list', array (
						'project_id' => $project->id
					))
				),
				array (
					'label' => Yii::t('project', 'Close window'),
					'url' => 'javascript:close()'
				),
				array (
					'label' => Yii::t('project', 'Close project'),
					'url' => 'javascript:alert("Not yet implemented")'
				)
			)
		),
		array (
			'label' => Yii::t('project', 'Meetings'),
			'items' => $meetings
		)
	),
	
));
?> 

<div id="content">
<?php echo $content; ?>
</div><!-- content -->

<div id="footer">
Copyright &copy; 2009 by <a href="http://www.harlie.fr" target="harlie">Harlie</a>. 
All Rights Reserved.<br/>
<?php echo Yii::powered(); ?>
</div><!-- footer -->

</div><!-- page -->
</body>

</html>